const qs = {
  'A': 1,
  'B.C': 2,
  'D.E.E': 3,
  'F.A.D.A': 4
}

function parse(obj) {
  const res = {}
  for (const [key, val] of Object.entries(obj)) {
    let target = res
    key.split('.').map((now, i, arr) => arr[i] = arr[i - 1] === now ? '' : now)
      .join('').split('').forEach((prop, idx, self) => {
        const temp = target[prop] || {}
        target[prop] = idx === self.length - 1 ? val : temp
        target = temp
      })
  }
  return res
}

console.log(parse(qs))